package com.henu.engineer.dao.mapper.student;

import com.henu.engineer.dao.entity.student.StudentCourseMethod;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author noexcept
 * @date 2021/7/27 22:02
 */
@Mapper
@Repository
public interface StudentCourseMethodXmlMapper {

    boolean insertSingle(StudentCourseMethod studentCourseMethod);

    int insertList(List<StudentCourseMethod> list);

    boolean deleteSingle(String studentId, String courseId, String method);

    boolean updateSingle(String studentId, String courseId, String method, Double score);

    StudentCourseMethod selectSingle(String studentId, String courseId, String method);

    /**
     * 查询某学生的某课程的所有考核方式的分数
     * @param studentId
     * @param courseId
     * @return 键有{@code "method"}和{@code "score"},对应的值分别为考核方式和分数
     */
    List<Map<String,Double>> selectMultiMethodScore(String studentId, String courseId);
}
